package picture;

public class Triangle extends Picture {
	private double a, b, c, girth, acreage;

	/**
	 * @param bianchang1
	 * @param biangchang2
	 * @param biangchang3
	 */
	public Triangle(double bianchang1, double bianchang2, double bianchang3) {
		super();
		this.a = bianchang1;
		this.b = bianchang2;
		this.c = bianchang3;
	}

	public double getGirth() {
		this.girth = a + b + c;
		return this.girth;
	}

	public double getAcreage() {
		double p = (a + b + c) / 2;
		return this.acreage = Math.sqrt(((p - a) * (p - b) * (c)) * p);
	}
}
